Lisp Algorithms 1 1 . Using the New Common Lisp Pretty Printer

نویسنده

  • Richard C. Waters
چکیده

This technical report gathers together three papers that were written during 1992 and 1993 and submitted for publication in ACM Lisp Pointers. Chapter 1 \Using the New Common Lisp Pretty Printer" explains how the pretty printing facilities that have been adopted as part of the forthcoming Common Lisp standard can be used to gain detailed control over the printing of lists. As an example, it shows how the pretty printer can be used to print a subset of Lisp as Pascal. Chapter 2 \Macroexpand-All: An Example of a Simple Lisp Code Walker" presents a function macroexpand-all for expanding all the macro calls in a Lisp expression. This is useful when debugging macros and can be helpful as a subroutine when writing complex macros. In addition, the chapter serves as an introduction to code walkers|the general class of programs of which macroexpand-all is an example. Code walkers are important because they are a vital part of the foundation of many Lisp programming tools and macro packages. Chapter 3 \To NReverse When Consing a List or By Pointer Manipulation, To Avoid It; That Is the Question" discusses a question that Lisp programmers have argued about for decades. When creating an ordered list of elements it is often convenient to push the items onto the list one at a time and then call nreverse to put resulting list in the correct order. By writing more complex code, you can enter the elements in the list in the correct order in the rst place. It seems that this latter approach should be better since it avoids calling nreverse, but is it? Submitted to ACM Lisp Pointers. 201 Broadway Cambridge Massachusetts 02139 Publication History:1. First printing, TR 92-17, August 1993 2. Chapter 1 published as \Using the New Common Lisp Pretty Printer" ACM Lisp Pointers, 5(2):27{34, April 1992. Copyright c Mitsubishi Electric Research Laboratories, 1991 201 Broadway; Cambridge Massachusetts 02139 This work may not be copied or reproduced in whole or in part for any commercial purpose. Permission to copy in whole or in part without payment of fee is granted for nonpro t educational and research purposes provided that all such whole or partial copies include the following: a notice that such copying is by permission of Mitsubishi Electric Research Laboratories of Cambridge, Massachusetts; an acknowledgment of the authors and individual contributions to the work; and all applicable portions of the copyright notice. Copying, reproduction, or republishing for any other purpose shall require a license with payment of fee to Mitsubishi Electric Research Laboratories. All rights reserved.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Gaussian Approximations of Objects Bounded by Algebraic Curves

We present a discrete approximation method for planar algebraic curves. This discrete approximation is hierarchical, curvature dependent, and provides eecient algorithms for various primitive geometric operations on algebraic curves. We consider applications on the curve intersections , the distance computations, and the common tangent and convolution computations. We implemented these approxim...

متن کامل

A Verified Runtime for a Verified Theorem Prover

Theorem provers, such as ACL2, HOL, Isabelle and Coq, rely on the correctness of runtime systems for programming languages like ML, OCaml or Common Lisp. These runtime systems are complex and critical to the integrity of the theorem provers. In this paper, we present a new Lisp runtime which has been formally verified and can run the Milawa theorem prover. Our runtime consists of 7,500 lines of...

متن کامل

SNMP for Common Lisp

Simple Network Management Protocol (SNMP) is widely used for management of Internet-based network today. In Lisp community, there’re large Lisp-based applications which may need be monitored, and there’re Lispers who may need to monitor other remote systems which are either Lisp-based or not. However, the relationship between Lisp and SNMP haven’t been studied enough during past 20 years. The C...

متن کامل

Lisp-in-Lisp: High Performance and Portability

Until recently every Lisp implementation has had either a relatively large assembly language core or extensive microcode support. We have been working on a Common Lisp [Steele 1982] for the S-1 Mark IIA super-computer being developed at LLNL, producing an implementation that has high performance, exploits the complex architecture of the S-1, and which is almost entirely written in Lisp [Brooks ...

متن کامل

CARMA: Platform Freedom for a Graphical Lisp Application through Armed Bear Common Lisp

CARMA is an advisory system that uses artificiallyintelligent techniques including case-based reasoning to provide advice about the most environmentally and economically effective responses to grasshopper infestations. CARMA’s core AI reasoner was initially written in Common Lisp and integrated with an Allegro Common Lisp for Windows graphical user interface (GUI). CARMA went public in 1996 and...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1993